
#include <iostream>
#include <cstdio>
using namespace std;

void foo( ) {
	throw "foo's error"
}

class A {
	public:
		~A( ) {
			throw "err";
		}
};

// designer
// ------------------------------------------------------------------
// user

int main( void ) {
	try {
		A a;
		foo( );
	}
	catch( const char* a ) {
		cout << a << endl;
	}

	return 0;
}

